Fix test environments
authorMatthias Clasen <mclasen@redhat.com>
Wed, 18 Oct 2017 08:55:02 +0000 (16:55 +0800)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 18 Oct 2017 15:30:20 +0000 (17:30 +0200)
testsuite/a11y/meson.build
testsuite/css/meson.build
testsuite/css/nodes/meson.build
testsuite/css/parser/meson.build
testsuite/css/style/meson.build
testsuite/gdk/meson.build
testsuite/gsk/meson.build
testsuite/gtk/meson.build
testsuite/meson.build
testsuite/tools/meson.build

index 8950e6f7904e084eeda54f0cef3bf4496d474f07..164eda40abfe2aeaca1a45289c53b6682237c791 100644 (file)
@@ -1,3 +1,6 @@
+testexecdir = join_paths(installed_test_bindir, 'a11y')
+testdatadir = join_paths(installed_test_datadir, 'a11y')
+
 a11y_tests = [
   'accessibility-dump',
   'tree-performance',
@@ -10,9 +13,6 @@ a11y_tests = [
   'util',
 ]
 
-testexecdir = join_paths(installed_test_bindir, 'a11y')
-testdatadir = join_paths(installed_test_datadir, 'a11y')
-
 foreach t: a11y_tests
   test_prefix = 'a11y'
 
@@ -22,7 +22,13 @@ foreach t: a11y_tests
                     install_dir: testexecdir,
                     dependencies: libgtk_dep),
         args: [ '--tap', '-k', ],
-        env: installed_test_env,
+        env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+               'GSETTINGS_BACKEND=memory',
+               'GTK_CSD=1',
+               'G_ENABLE_DIAGNOSTIC=0',
+               'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+               'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+             ],
         suite: 'a11y')
 endforeach
 
index 53297089c8bb933cc0b99e9a87ee069f374e266f..077cb7d5c31ac473cad845d78de303a8c514faa9 100644 (file)
@@ -11,7 +11,13 @@ test_api = executable('api', 'api.c',
                       install_dir: testexecdir)
 test('api', test_api,
      args: ['--tap', '-k' ],
-     env: installed_test_env,
+     env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+            'GSETTINGS_BACKEND=memory',
+            'GTK_CSD=1',
+            'G_ENABLE_DIAGNOSTIC=0',
+            'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+            'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+          ],
      suite: 'css')
 
 if get_option('install-tests')
index 0ce567ebacc73680d6d6d9cb0a5f887afa6fe2c6..67abd8667d617f6716bdaaf27b5f9a2021bb92d5 100644 (file)
@@ -1,14 +1,19 @@
 testexecdir = join_paths(installed_test_bindir, 'css', 'nodes')
 testdatadir = join_paths(installed_test_datadir, 'css')
 
-testexecdir = join_paths(installed_test_bindir, 'css', 'nodes')
 test_nodes = executable('test-css-nodes', 'test-css-nodes.c',
                         install: get_option('install-tests'),
                         install_dir: testexecdir,
                         dependencies: libgtk_dep)
 test('nodes', test_nodes,
      args: [ '--tap', '-k' ],
-     env: installed_test_env,
+     env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+            'GSETTINGS_BACKEND=memory',
+            'GTK_CSD=1',
+            'G_ENABLE_DIAGNOSTIC=0',
+            'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+            'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+          ],
      suite: 'css')
 
 test_data = [
index ac91b6c0c92e0a7867cb9f101554fae0c7759d7f..9be1fdf8e764466d7a6a52706e2f75487d722179 100644 (file)
@@ -7,7 +7,13 @@ test_parser = executable('test-css-parser', 'test-css-parser.c',
                          dependencies: libgtk_dep)
 test('parser', test_parser,
      args: [ '--tap', '-k' ],
-     env: installed_test_env,
+     env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+            'GSETTINGS_BACKEND=memory',
+            'GTK_CSD=1',
+            'G_ENABLE_DIAGNOSTIC=0',
+            'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+             'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+          ],
      suite: 'css')
 
 test_data = [
index 5c84c02049e54c5cd5043bb5cef80ed86c4d9f2f..fa2515f31375e2b048c53b7d98e82cd687323d03 100644 (file)
@@ -17,7 +17,13 @@ test_style = executable(
 )
 test('style', test_style,
      args: [ '--tap', '-k' ],
-     env: installed_test_env,
+     env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+            'GSETTINGS_BACKEND=memory',
+            'GTK_CSD=1',
+            'G_ENABLE_DIAGNOSTIC=0',
+            'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+            'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+          ],
      suite: 'css')
 
 test_data = [
index 84b503daa56d8b25829b25bbfc4bfd5ab643bb79..df60341f85d6672736e32b20be67c0eca6a6a5cc 100644 (file)
@@ -20,7 +20,13 @@ foreach t : tests
 
   test(t, test_exe,
        args: [ '--tap', '-k' ],
-       env: installed_test_env,
+       env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+              'GSETTINGS_BACKEND=memory',
+              'GTK_CSD=1',
+              'G_ENABLE_DIAGNOSTIC=0',
+              'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+              'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+            ],
        suite: 'gdk')
 
   if get_option('install-tests')
index 7b932d3f7bd0ed75fc8be9ef54f1fa8c98080f97..8e4e39754cd0d8a177ad63bd80b0f5a5098d6acc 100644 (file)
@@ -10,28 +10,36 @@ test_render_nodes = executable(
   install_dir: testexecdir
 )
 
-cairo_test_env = environment()
-cairo_test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
-cairo_test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
-cairo_test_env.set('GSETTINGS_BACKEND', 'memory')
-cairo_test_env.set('G_ENABLE_DIAGNOSTIC', '0')
-cairo_test_env.set('GSK_RENDERER', 'cairo')
-
 test('nodes (cairo)', test_render_nodes,
-             args: [ '--tap', '-k' ],
-             env: cairo_test_env,
-             suite: 'gsk')
+     args: [ '--tap', '-k' ],
+     env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+            'GSETTINGS_BACKEND=memory',
+            'GTK_CSD=1',
+            'G_ENABLE_DIAGNOSTIC=0',
+            'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+            'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+            'GSK_RENDERER=cairo'
+          ],
+     suite: 'gsk')
 
 vulkan_test_env = environment()
 vulkan_test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
 vulkan_test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
 vulkan_test_env.set('GSETTINGS_BACKEND', 'memory')
+vulkan_test_env.set('GTK_CSD', '1')
 vulkan_test_env.set('G_ENABLE_DIAGNOSTIC', '0')
 vulkan_test_env.set('GSK_RENDERER', 'vulkan')
 
 test('nodes (vulkan)', test_render_nodes,
      args: [ '--tap', '-k' ],
-     env: vulkan_test_env,
+     env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+            'GSETTINGS_BACKEND=memory',
+            'GTK_CSD=1',
+            'G_ENABLE_DIAGNOSTIC=0',
+            'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+            'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+            'GSK_RENDERER=vulkan'
+          ],
      suite: 'gsk')
 
 test_data = [
index 1c91d192ea119dd530b4f7e3141c7e0161c0261c..dab8a506e966c0e65219b34563ffc9f7d1567db3 100644 (file)
@@ -76,7 +76,13 @@ foreach t : tests
 
   test(test_name, test_exe,
        args: [ '--tap', '-k' ],
-       env: installed_test_env,
+       env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+              'GSETTINGS_BACKEND=memory',
+              'GTK_CSD=1',
+              'G_ENABLE_DIAGNOSTIC=0',
+              'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+              'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+            ],
        suite: 'gtk')
 endforeach
 
@@ -90,7 +96,13 @@ if add_languages('cpp')
                         install_dir: testexecdir)
   test('c++ keywords', test_exe,
        args: [ '--tap', '-k' ],
-       env: installed_test_env,
+       env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+              'GSETTINGS_BACKEND=memory',
+              'GTK_CSD=1',
+              'G_ENABLE_DIAGNOSTIC=0',
+              'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+              'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+            ],
        suite: 'gtk')
   if get_option('install-tests')
     conf = configuration_data()
index fa283dd65cdd1c41d86842ad7f19fb5ef327c8c5..f966e769da677b367f5a29080a17366c2639079f 100644 (file)
@@ -2,15 +2,6 @@ gtk_libexecdir = join_paths(gtk_prefix, get_option('libexecdir'))
 installed_test_bindir = join_paths(gtk_libexecdir, 'installed-tests', 'gtk-4.0')
 installed_test_datadir = join_paths(gtk_datadir, 'installed-tests', 'gtk-4.0')
 
-installed_test_env = [
-  'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
-  'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
-  'GIO_USE_VOLUME_MONITOR=unix',
-  'GSETTINGS_BACKEND=memory',
-  'GTK_CSD=1',
-  'G_ENABLE_DIAGNOSTIC=0',
-]
-
 subdir('gdk')
 subdir('gsk')
 subdir('gtk')
index 64724d292b764427f56b24617bfcf8be54814ae7..cfce7a3a1c307fd462a155adbafda90e8b888ec9 100644 (file)
@@ -4,8 +4,6 @@ testdatadir = join_paths(installed_test_datadir, 'tools')
 bash = find_program('bash', required : false)
 if bash.found()
   test_env = environment()
-  test_env.set('GTK_BUILDER_TOOL', get_variable('gtk4_builder_tool').full_path())
-  test_env.set('GTK_QUERY_SETTINGS', get_variable('gtk4_query_settings').full_path())
 
   foreach t : ['simplify', 'settings']
     configure_file(output: t,
@@ -16,7 +14,15 @@ if bash.found()
     test(t, bash,
          args: 'test-@0@'.format(t),
          workdir: meson.current_build_dir(),
-         env: test_env,
+         env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+                'GSETTINGS_BACKEND=memory',
+                'GTK_CSD=1',
+                'G_ENABLE_DIAGNOSTIC=0',
+                'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+                'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+                'GTK_BUILDER_TOOL=@0@'.format(get_variable('gtk4_builder_tool').full_path()),
+                'GTK_QUERY_SETTINGS=@0@'.format(get_variable('gtk4_query_settings').full_path())
+              ],
          suite: 'tools')
   endforeach
 endif